<?php
/**
* @version		$Id:vmusers.php  1 2013-11-05 20:17:56Z  $
* @package		Cash_user
* @subpackage 	Tables
* @copyright	Copyright (C) 2013, . All rights reserved.
* @license #
*/

// no direct access
defined('_JEXEC') or die('Restricted access');

/**
* Jimtawl TableVmusers class
*
* @package		Cash_user
* @subpackage	Tables
*/
class TableVmusers extends JTable
{
	
   /** @var int virtuemart_user_id- Primary Key  **/
   public $virtuemart_user_id = null;

   /** @var varchar virtuemart_user_id  **/
   public $virtuemart_user_id = null;

   /** @var int created_by  **/
   public $created_by = null;

   /** @var int modified_by  **/
   public $modified_by = null;

   /** @var smallint unsigned virtuemart_vendor_id  **/
   public $virtuemart_vendor_id = null;

   /** @var tinyint user_is_vendor  **/
   public $user_is_vendor = null;

   /** @var char customer_number  **/
   public $customer_number = null;

   /** @var char perms  **/
   public $perms = "shopper";

   /** @var mediumint unsigned virtuemart_paymentmethod_id  **/
   public $virtuemart_paymentmethod_id = null;

   /** @var mediumint unsigned virtuemart_shipmentmethod_id  **/
   public $virtuemart_shipmentmethod_id = null;

   /** @var tinyint agreed  **/
   public $agreed = null;

   /** @var datetime created_on  **/
   public $created_on = "0000-00-00 00:00:00";

   /** @var datetime modified_on  **/
   public $modified_on = "0000-00-00 00:00:00";

   /** @var datetime locked_on  **/
   public $locked_on = "0000-00-00 00:00:00";

   /** @var int locked_by  **/
   public $locked_by = null;




	/**
	 * Constructor
	 *
	 * @param object Database connector object
	 * @since 1.0
	 */
	public function __construct(& $db) 
	{
		parent::__construct('#__virtuemart_vmusers', 'virtuemart_user_id', $db);
	}

	/**
	* Overloaded bind function
	*
	* @acces public
	* @param array $hash named array
	* @return null|string	null is operation was satisfactory, otherwise returns an error
	* @see JTable:bind
	* @since 1.5
	*/
	public function bind($array, $ignore = '')
	{ 
		
		return parent::bind($array, $ignore);		
	}

	/**
	 * Overloaded check method to ensure data integrity
	 *
	 * @access public
	 * @return boolean True on success
	 * @since 1.0
	 */
	public function check()
	{



		/** check for valid name */
		/**
		if (trim($this->virtuemart_user_id) == '') {
			$this->setError(JText::_('Your Vmusers must contain a virtuemart_user_id.')); 
			return false;
		}
		**/		

		return true;
	}
}
